<script setup>
import {reactive, ref, toRefs} from "vue";
import {decode} from "js-base64";
const props = defineProps({
  form:Object
})
const emit = defineEmits(['next'])
const data = reactive({
  form:{},
  rules:{
    APPLICANT_NAME:[{required:true, message: '委托单位不能为空'}],
    APPLICANT_PERSON: [ {required: true, message: '委托联系人不能为空'}],
    APPLICANT_PHONE:[{required:true, message: '委托联系电话不能为空'}],
    // APPLICANT_ADDRESS:[{required:true, message: '委托联系地址不能为空'}]
  }
})
const {form, rules} = toRefs(data)

const formInfo = ref()

const encodeStr = ref('')

defineExpose({
  formInfo
})
</script>

<template>
  <el-form label-width="120px" ref="formInfo" :model="props.form" :rules="rules">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="委托单位名称" prop="APPLICANT_NAME">
          <el-input v-model="props.form.APPLICANT_NAME"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="联系人" prop="APPLICANT_PERSON">
          <el-input v-model="props.form.APPLICANT_PERSON" placeholder="请填写委托单位联系人"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="联系电话" prop="APPLICANT_PHONE">
          <el-input v-model="props.form.APPLICANT_PHONE" placeholder="委托单位联系电话"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="单位地址" prop="APPLICANT_ADDRESS">
          <el-input v-model="props.form.APPLICANT_ADDRESS" placeholder="委托单位地址"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="市场主体名称" prop="SAMPLED_SUBJECT_NAME">
          <el-input v-model="props.form.SAMPLED_SUBJECT_NAME" placeholder="被抽样市场主体名称（仅适用于抽样）"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="联系电话" prop="SAMPLED_SUBJECT_PHONE">
          <el-input v-model="props.form.SAMPLED_SUBJECT_PHONE" placeholder="市场主体联系电话"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="市场主体地址" prop="SAMPLED_SUBJECT_ADDRESS">
          <el-input v-model="props.form.SAMPLED_SUBJECT_ADDRESS"
                    placeholder="被抽样市场主体地址 （仅适用于抽样）"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="联系人" prop="SAMPLED_SUBJECT_PERSON">
          <el-input v-model="props.form.SAMPLED_SUBJECT_PERSON" placeholder="市场主体联系人"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
<!--    <el-form-item label="加密字符串">-->
<!--      <el-input v-model="encodeStr" type="textarea"></el-input>-->
<!--    </el-form-item>-->
<!--    <el-text>{{decode(encodeStr)}}</el-text>-->
  </el-form>
</template>

<style scoped lang="scss">

</style>